package com.net.xpay.common.manager;

import com.net.common.manager.VersionedManager;
import com.net.xpay.common.domain.User;
import com.net.xpay.common.enums.user.CommissionMode;
import com.net.xpay.common.model.search.UserSearchModel;

import java.time.LocalDateTime;
import java.util.List;


public interface UserManager extends VersionedManager<Long,User> {
    User findByMobile(String mobile);

    List<User> search(UserSearchModel searchModel);

    List<Long> listIds(UserSearchModel searchModel);

    long searchCount(UserSearchModel searchModel);

    User findByAppkey(String appkey);

    List<User> listByPartnerId(Long partnerId);

    List<User> listAll();

    User findByChannelMasterIdAndOuterId(Long channelMasterId, String outerId);

    User findByUid(String uid);

    /**
     *统计注册的商户数(根据partnerId)
     */
    long countRegister(Long partnerId, LocalDateTime minEndTime, LocalDateTime maxEndTime);
    /**
     *统计注册的商户数(全部)
     */
    long countUserRegister(LocalDateTime minEndTime, LocalDateTime maxEndTime);

    List<User> listByCommissionMode(CommissionMode mode);


    User findByName(String name);
}
